//
//  QiniuConf.h
//  XPhoto
//
//  Created by baboy on 2019/6/25.
//  Copyright © 2019 baboy. All rights reserved.
//

#import "Model.h"
#import <BKKit/BKApi.h>
#import "QiniuSDK.h"
NS_ASSUME_NONNULL_BEGIN

@interface QiniuConf : Model

@property(nonatomic, strong) NSString *token;
@property(nonatomic, strong) NSString *domain;
+ (instancetype)defaultConf;
+ (QNUploadManager*) defaultUploadManager;
+ (id)queryConfWithCallback:(nullable void (^)(id _Nonnull task, id _Nullable json, NSError * _Nullable error))callback;

+ (void)uploadFile:(NSString*)fp
          fileName:(NSString*)fn
          progress:(void(^)(NSString *key, float percent))progress
        completion:(void (^)(QNResponseInfo *info, NSString *key, NSDictionary *resp))callback;

+ (void)uploadPHAsset:(PHAsset*)phAsset
               fileName:(NSString*)fn
          progress:(void(^)(NSString *key, float percent))progress
           completion:(void (^)(QNResponseInfo *info, NSString *key, NSDictionary *resp))callback;
@end

NS_ASSUME_NONNULL_END
